greatest-minimum theorem